package io.gitee.zhangbinhub.acp.boot.socket.init

import io.gitee.zhangbinhub.acp.boot.init.AcpInitialization
import io.gitee.zhangbinhub.acp.boot.socket.init.task.InitTcpServer
import io.gitee.zhangbinhub.acp.boot.socket.init.task.InitUdpServer

/**
 * @since JDK 17
 */
class AcpSocketServerInitialization(
    private val initTcpServer: InitTcpServer,
    private val initUdpServer: InitUdpServer
) : AcpInitialization {

    override val name: String
        get() = "socket server setup server"

    /**
     * 启动ftp服务
     */
    override fun doInit() {
        /* 启动初始化socket服务 */
        initTcpServer.startTcpServer()
        initUdpServer.startUdpServer()
    }
}
